import time
import pyautogui
import pyautogui as pag
from utils.kmlkeymouse import *
import random

from utils.startendgame import startgame
from utils.utils import *

if __name__ == '__main__':
    unload_driver()
    time.sleep(3)
    load_driver()
    startgame()

    while True:
        time.sleep(3)

        # current_x, current_y = get_position()
        current_x, current_y = random.randint(348, 1601), random.randint(77, 1012)
        role_move_coor(current_x, current_y)
        # optnum = random.randint(0,10)
        # if optnum == 0:
        #     role_move_coor(current_x, current_y)
        # if optnum == 1:
        #     keydownup(key="b")
        # if optnum == 2:
        #     keydownup(key="q")
        # if optnum == 3:
        #     keydownup(key="w")
        # if optnum == 4:
        #     keydownup(key="e")
        # if optnum == 5:
        #     keydownup(key="r")
        # if optnum == 6:
        #     keydownup(key="d")
        # if optnum == 7:
        #     keydownup(key="f")
        # if optnum == 8:
        #     keydownup(key="p")
        # if optnum == 9:
        #     keydownup(key="ctrl")
    unload_driver()
